import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/user/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  console.log('getInfo')
  return request({
    url: '/user/getInfo',
    method: 'get'
  })
}

export function logout() {
  return request({
    url: '/user/logout',
    method: 'get'
  })
}

// 这里加一个，根据data的不同，后台会返回不同的字符串结果，动态菜单完成
export function getManagementMenu(data) {
  return request({
    url: '/user/getManagementMenu',
    method: 'get',
    data
  })
}
